package com.szxy.cart.feigin;

import com.szxy.pojo.TbUser;
import com.szxy.utils.CartItem;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @Auther:zwer
 * @Date:2019/9/25 16:06
 * @Description:com.szxy.cart.feigin
 * @Version:1.0
 **/
@FeignClient(value = "common-redis")
public interface CommonRedisFeignClient {

    @PostMapping("/redis/cart/insertToCart")
    void insertToCart(@RequestBody Map<String, Object> map);

    @GetMapping("/redis/cart/selectCartByUserId")
    Map<String, CartItem> selectCartByUserId(@RequestParam("userId") String userId);

    @RequestMapping("/service/redis/user/checkUserToken")
    TbUser checkUserToken(@RequestParam  String userToken);

}
